import Vue from "vue";
import Router from "vue-router";

Vue.use(Router);

export default new Router({
  routes: [
    {
      path: "/app",
      name: "app",
      component: () => import("./views/webapp.vue"),
      redirect: "/home",
      children: [
        {
          path: "/home",
          name: "home",
          component: () => import("./views/children/home.vue"),
          meta: {
            baner: ["首页"],
          },
        },
        {
          path: "/list",
          name: "list",
          component: () => import("./views/children/list.vue"),
          meta: {
            baner: ["列表"],
          },
        },
        {
          path: "/cart",
          name: "cart",
          component: () => import("./views/children/cart.vue"),
          meta: {
            baner: ["购物车"],
          },
        },
        {
          path: "/min",
          name: "min",
          component: () => import("./views/children/min.vue"),
          meta: {
            baner: ["我的"],
          },
        },
      ],
    },
    {
      path: "/xq",
      name: "xq",
      component: () => import("./views/xiangqing/xq.vue"),
    },
    {
      path: "/jxuang",
      name: "jxuang",
      component: () => import("./views/xiangqing/jingxuan.vue"),
    },
    {
      path: "/xqy",
      name: "xqy",
      component: () => import("./views/xiangqing/jingxuanxiangqing.vue"),
    },
    {
      path: "/login",
      name: "login",
      component: () => import("./views/login/login.vue"),
    },
    {
      path: "/listxiangqing",
      name: "listxiangqing",
      component: () => import("./views/xiangqing/listxiangqing.vue"),
    },
  ],
});
